package com.csun.dsms.service;

import com.csun.dsms.comment.core.support.IService;
import com.csun.dsms.model.domain.DsmsRoleMenu;
import com.csun.dsms.model.domain.DsmsUser;
import com.csun.dsms.model.vo.menu.MenuVo;

import java.util.List;
import java.util.Set;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-01 13:21
 * @description: TODO
 */
public interface DsmsRoleMenuService extends IService<DsmsRoleMenu> {

    /**
     * 查询用户菜单树
     *
     * @param login the login user
     *
     * @return  the user menu vo list
     */
    List<MenuVo> queryOwnMenuTree(DsmsUser login);

    /**
     * Delete by role id list.
     *
     * @param roleIdList
     */
    Integer deleteByRoleIdList(List<Long> roleIdList);

    /**
     * delete role menu by role id
     *
     * @param roleId    the role id
     *
     * @return  the int..
     */
    Integer deleteByRoleId(Long roleId);

    /**
     * insert role menu
     *
     * @param roleId    the role id
     * @param menuIdList    the menu id list
     *
     * @return  the int.
     */
    Integer insert(Long roleId, Set<Long> menuIdList);
}
